﻿using UnityEngine;

/// <summary>
/// 控制玩家行为的组件
/// </summary>
public abstract class ActionController : MonoBehaviour
{
    protected Character player;
    protected EventSystem eventSystem;
    protected Rigidbody2D m_rigidbody;
    protected AudioPlayer audioPlayer;
    protected Transform transform_player;

    protected void Start()
    {
        player = Character.Instance;
        eventSystem = Service.Get<EventSystem>();
        audioPlayer = Service.Get<AudioPlayer>();
        m_rigidbody = Character.Instance.GetComponent<Rigidbody2D>();
        transform_player = Character.Instance.transform;
        OnStart();
    }

    protected virtual void OnStart() { }
}
